home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright 1992, 1993, 1994, Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- * the contents of this file may not be disclosed to third parties, copied or
- * duplicated in any form, in whole or in part, without the prior written
- * permission of Silicon Graphics, Inc.
- *
- * RESTRICTED RIGHTS LEGEND:
- * Use, duplication or disclosure by the Government is subject to restrictions
- * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- * rights reserved under the Copyright Laws of the United States.
- */
- #define ELEMNAMESIZE 4
- #define MOLNAMESIZE 80
-
-
- #define MAX(a,b) ((a)>(b)?(a):(b))
- #define MIN(a,b) ((a)<(b)?(a):(b))
-
- typedef struct element {
- char name[ELEMNAMESIZE];
- float radius;
- long color;
- struct element *next;
- };
-
- typedef struct atom {
- struct element *e;
- float xyz[3];
- struct atom *next;
- };
-
- typedef struct molecule {
- char name[MOLNAMESIZE];
- float min[3];
- float max[3];
- struct atom* atoms;
- struct molecule *next;
- };
-
- extern struct element *elementRoot;
- extern struct molecule *moleculeRoot;
-
- extern struct atom *freeAtoms(struct atom *p);
- extern struct molecule *freeMolecules(struct molecule *p);
- extern struct element *freeElements(struct element *p);
- extern struct element *createElement(struct element *p, char *name,
- float radius, float red, float green, float blue);
- extern struct molecule *createMolecule(struct molecule *p, char *name);
- extern struct element *findElement(struct element *p, char *name);
- extern struct atom *createAtom(struct atom *p, struct element *e, float x, float y, float z);
- extern void addAtom(struct molecule *p, char *name, float x, float y, float z);
-